/**
 * Copyright (c) 2011 Nokia Corporation.
 */

#ifndef MYGAMEWINDOW_H
#define MYGAMEWINDOW_H

#include <QMouseEvent>
#include <QGLWidget>
#include "SpriteBatch.h"
#include <QVector2D>
#include "SpriteBatchTester.h"


class MyGameWindow : public QGLWidget
{
    Q_OBJECT

public:
    explicit MyGameWindow(QWidget *parent = 0);
    virtual ~MyGameWindow();


protected: // QGLWidget
    void resizeGL(int width, int height);
    void initializeGL();
    void paintGL();
    //void mousePressEvent(QMouseEvent *e);
    void onDestroy();

protected:
    GLuint glhelpLoadTexture( QString imageFile );
        // Handle to a GL texture for the sprite.
    GLuint texture;

        // Following are set by onSizeChanged event
    int currentWidth;
    int currentHeight;
    float matrixProjection[16];

        // Pointer to abstract "SpriteBatch"-class
    SpriteBatch *spriteBatch;

    SpriteBatchTester tester;

};


#endif // MYGAMEWINDOW_H
